<tagLib name="html" />
<include file="Public:header" />
<script type="text/javascript">
	//修改资料
	function modifyUserInfo(){
		var name = document.getElementById('id_name');
		if(name.value.length==0){
			document.getElementById('id_p_error').innerHTML = '用户名不可为空！';
			return false;
		}
		if(document.getElementById('id_psw').value.length>0){
			document.getElementById('id_true_psw').value = md5(document.getElementById('id_psw').value);	
		}	
		document.getElementById('id_modify_user_info_form').submit();
		return true;
	}
	
	//删除用户
	function deleteUserInfo(){
		document.getElementById('id_delete').value='true';
		document.getElementById('id_modify_user_info_form').submit();
		return true;
	}
</script>
<div class="con_box right">
  <div class="u_content">
    <div class="con_tit"> 
      <ul class="left"><img src="../Public/images/jiao.gif"/></ul>
      <ul class="tit_bg">首页</ul> 
    </div>
    <div class="con_main left">          
           <div class="left con_admin">
              <div class="left con_admin"><h1>「<a style="color:#ff5113;">{$name}</a>」资料<a style="color:#ff5113;">修改</a></h1></div>
              <div class="ad_change">
                  <div class="change_box" >
                    <form id="id_modify_user_info_form" action="http://{$_SERVER['HTTP_HOST']}/index.php/User/modifyUserInfo" method="post">
                     <p><label>序号：</label><input id="id_name" name="user_id" type="text" disabled="true" class="input1" value="{$uid}"/></p>
                     <p><label>用户名：</label><input id="id_name" name="name" type="text" class="input1" value="{$name}"/></p>
                     <p><label>真实姓名：</label><input id="id_true_name" name="true_name" type="text" class="input1" value="{$true_name}"/></p>
                     <p><label>角色：</label>
                     	<input id="id_role3" name="role3" type="checkbox" class="input2" disabled="true" checked="checked">客服                    	
	                    <present name="roles[2]">
	                    	<input id="id_role2" name="role2" type="checkbox" class="input2" checked="checked">客服管理员
	                    <else/>
	                    	<input id="id_role2" name="role2" type="checkbox" class="input2" >客服管理员
	                    </present>	                    	
	                    <present name="roles[1]">
	                    	<input id="id_role1" name="role1" type="checkbox" class="input2" checked="checked">管理员
	                    <else/>
	                    	<input id="id_role1" name="role1" type="checkbox" class="input2" >管理员
	                    </present>
                     </p>
                     <p><label>密码：</label><input id="id_psw" name="psw" type="password" class="input1" /></p>
                     <p><label>邮箱：</label><input name="email" type="text" class="input1" value="{$email}"/></p>
                     <p><label>备注：</label><textarea name="remark">{$remark}</textarea>
                     <input id="id_delete" name="deleteValue" type="hidden" value="false"/>
                     <input name="uid" type="hidden" value="{$uid}"/>
                     <input id="id_true_psw" name="true_psw" type="hidden" value=""/>
                     <input class="ci"  type="button" title="请确认信息" value="修&nbsp;&nbsp;&nbsp;改 " onclick="javascript:return modifyUserInfo()"/>
                     <input class="ci"  type="button" title="请确认信息" value="删&nbsp;&nbsp;&nbsp;除 " onclick="javascript:return deleteUserInfo()"/>
                     </p>
                  </form>
                  <div><p id="id_p_error" class="p_error"><present name="msg">{$msg}</else></present></p></div>
                 </div>   
              </div> 
            </div>                    
    </div>     
  </div>
</div>
<tagLib name="html" />
<include file="Public:foot" />